<?php
namespace core\tpl;


class BaseTpl implements Tpl {
    /** 模板目录 */
    protected $_tplDir;
    /** 模板数据 */
    protected $_tplData = [];

    /**
     * BaseTpl constructor.
     * @param string $tplDir 模板目录
     */
    public function __construct($tplDir) {
        $this->_tplDir = $tplDir;
    }

    public function assign($key, $val) {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->_tplData[ $k ] = $v;
            }
        } else {
            $this->_tplData[ $key ] = $val;
        }
    }

    public function import($filename) {

    }
}
